<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<div class="divhome_login_box" style="display:none;"></div>
		<div class="box" style="display:none;">
		<span style="float: right;color:#FFF;font-size:12px;margin-right:5px;margin-top:5px;" src="" onclick="outhomeloginbox()">关闭</span>
			<form class="home_login_form" action="${front}/welcome/divWelcome.do" method="post">
			<input class="userType" id="userType" name="userType" type="hidden" value="4"/>
			<ul class="home_login_ul">
				<li class="home_login_tittle_li">欢迎登录实习云</li>
				<li class="home_login_li">
					<label class="home_login_label"><i class="Hui-iconfont grey">&#xe60d;</i></label>
					<input class="home_login_input" type="text" name="userName" id="userName" value="" placeholder="输入账号/手机号/邮箱"/>
					<div class="clearfix"></div>
				</li>
				<li class="home_login_li">
					<label class="home_login_label"><i class="Hui-iconfont grey">&#xe60e;</i></label>
					<input class="home_login_input" type="password" name="password" id="password" value=""  placeholder="输入密码" />
					<div class="clearfix"></div>
				</li>
				<li class="wjmm_zc_li">
					<%-- <a class="wjmm" href="${front}/welcome/userRetrievePaw.do">忘记密码?</a>&nbsp;&nbsp; --%>
					<input class="userType_input" type="checkbox" onclick="changeUserType()"><a style="color:#fff;">企业登录</a>&nbsp;
					<a class="zc" href="${back}/login/userRegisterUI.do">注册</a>
					<div class="clearfix"></div>
				</li>
				<li class="home_login_li">
					<input class="home_login_submit" type="button" onclick="loginsubmit()" value="登 &nbsp;录"/>
				</li>
				<li class="wjmm_zc_li">
				<font id="errorfont" style="size: 14px;color: red;margin:0 auto;">
				</font>
				</li>
			</ul>
			</form>
		</div>
		<script type="text/javascript">
		function loginsubmit(){
			var userName=$("#userName").val();
			var password=$("#password").val();
			var userType=$(".userType").val();
			 $.ajax({
				    type:'post',
				    url:"${front}/welcome/divWelcome.do",
				    data:{"userName":userName,"Password":password,"userType":userType},
				    cache:false,
				    dataType:'json',
				    success:function(date){
				    	if(date.success){
				    		outhomeloginbox();
				    		window.location.reload();
				    	}else{
				    		$("#errorfont").text(date.msg);
				    	}
				    }
				});
		}
		function changeUserType(){
	    	if($('#userType').val()==4){
	    	    $('#userType').val(5);
	    	}
	    	else if($('#userType').val()==5){
	        	$('#userType').val(4);
	    	}
	    }
		function outhomeloginbox(){
			 $('.box').css("display","none");
			 $('.divhome_login_box').css("display","none");
		 }
		</script>